#ifndef POSITIONSENSOR_H
#define POSITIONSENSOR_H

class PositionSensor;

#include "../Systems/abstractsystem.h"
#include<QObject>
#include <QTimer>
#include <QList>

class PositionSensor : public QObject
{
    Q_OBJECT

public:
    PositionSensor(AbstractSystem *a_sys, int freq, double a_delay=0, double a_imprecision=0);
    QList<double> getValues();

public slots:
    void update();

private:
    AbstractSystem *sys;
    double dt, imprecision;
    int delay;

    QList<double> values;
    QTimer *timer;
    QList<QList<double> > storedValues;
    static int counter;
};

#endif // POSITIONSENSOR_H
